<div class="hero-unit">
    <h4 class="api_main_intro">生成订单</h4>
    <div class="well">
        结算购物车内的商品，生成订单。
    </div>
    <h5>1.接口说明</h5>
    <div>结算购物车内的商品，生成订单。</div>
    <h5>2.应用场景</h5>
    <h5>3.接口调用说明</h5>
    <h6>3.1 请求说明</h6>
    <table class="table table-bordered table-striped">
        <tr>
            <td>url</td>
            <td>http://www.api.100hg.com/apiTools/router.verify</td>
        </tr>
        <tr>
            <td>格式</td>
            <td>JSON</td>
        </tr>
        <tr>
            <td>请求方式</td>
            <td>POST</td>
        </tr>
    </table>
    <h6>3.2 请求参数说明</h6>
    <table class="table table-bordered table-striped">
        <tr>
            <th>名称</th>
            <th>类型</th>
            <th>是否必须</th>
            <th>描述</th>
        </tr>
        <tr>
            <td>method</td>
            <td>String</td>
            <td>是</td>
            <td>固定为：trade.orders.generate</td>
        </tr>
        <tr>
            <td>ticket</td>
            <td>String</td>
            <td>是</td>
            <td>登录凭证，包含登录后的用户信息，登录时获取。</td>
        </tr>
        <tr>
            <td>receiver_name</td>
            <td>String</td>
            <td>是</td>
            <td>收货人</td>
        </tr>
        <tr>
            <td>receiver_mobile</td>
            <td>String</td>
            <td>是</td>
            <td>收货人电话</td>
        </tr>
        <tr>
            <td>province_id</td>
            <td>Int</td>
            <td>是</td>
            <td>省份ID</td>
        </tr>
        <tr>
            <td>city_id</td>
            <td>Int</td>
            <td>是</td>
            <td>城市ID</td>
        </tr>
        <tr>
            <td>receiver_address</td>
            <td>String</td>
            <td>是</td>
            <td>街道地址</td>
        </tr>
        <tr>
            <td>zip_code</td>
            <td>String</td>
            <td>否</td>
            <td>邮政编码</td>
        </tr>
        <tr>
            <td>payment_type</td>
            <td>Int</td>
            <td>是</td>
            <td>支付方式，1：线上支付；3：余额支付。</td>
        </tr>
        <tr>
            <td>coupon_id</td>
            <td>Int</td>
            <td>否</td>
            <td>代金券ID</td>
        </tr>
        <tr>
            <td>weight</td>
            <td>Int</td>
            <td>是</td>
            <td>商品总重量</td>
        </tr>
        <tr>
            <td>product_price</td>
            <td>Double</td>
            <td>是</td>
            <td>商品总价</td>
        </tr>
        <tr>
            <td>postage</td>
            <td>Double</td>
            <td>是</td>
            <td>总运费</td>
        </tr>
        <tr>
            <td>product_info</td>
            <td>String</td>
            <td>是</td>
            <td>
                商品信息，json格式编码， <br />
                json格式为:[ <br />
                    {id=123,size='',color='',count=1}, <br />
                    {id=124,size='',color='',count=2}, <br />
                    .. <br />
                ]
            </td>
        </tr>
    </table>
    <h6>3.3 返回参数说明</h6>
    <table class="table table-bordered table-striped">
        <tr>
            <th>名称</th>
            <th>类型</th>
            <th>描述</th>
        </tr>
        <tr>
            <td>state</td>
            <td>Int</td>
            <td>状态：1成功，其他失败</td>
        </tr>
        <tr>
            <td>msg</td>
            <td>String</td>
            <td>错误信息</td>
        </tr>
        <tr>
            <td>result</td>
            <td>Object</td>
            <td>返回结果</td>
        </tr>
        <tr>
            <td>result.charge_id</td>
            <td>Int</td>
            <td>订单交易号，不同于订单编号，一个交易号可包含多个订单编号。</td>
        </tr>
        <tr>
            <td>result.order_nums</td>
            <td>Array</td>
            <td>订单编号，数据对象。</td>
        </tr>
    </table>
</div>